<template>
  <div class="employees-container">
    <div class="app-container">
      <el-card>
        <el-tabs v-model="light">
          <el-tab-pane name="curcel" label="登录账户设置">
            <loginSet :user-detail="userDetail" />
          </el-tab-pane>
          <el-tab-pane name="detail" label="个人详情">
            <userInfo :user-detail="userDetail" />
          </el-tab-pane>
        </el-tabs>
      </el-card>
    </div>
  </div>
</template>

<script>
import loginSet from './components/login-setting.vue'
import userInfo from './components/user-info.vue'
import { getUserDetailById } from '@/api/employees'
export default {
  components: {
    loginSet,
    userInfo
  },
  data () {
    return {
      light: 'detail',
      userDetail: {}
    }
  },
  created () {
    this.getUserInfo()
  },
  methods: {
    async getUserInfo () {
      const userDetail = await getUserDetailById(this.$route.params.id)
      this.userDetail = userDetail
      // console.log(userDetail)
    }
  }

}
</script>

<style lang="scss" scoped>
</style>
